(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <utility/tagitem.h>
#include <proto/utility.h>
struct TagItem * NextTagItem()
SYNOPSIS
struct TagItem ** tagListPtr

LOCATION
In UtilityBase at offset 8
FUNCTION
Returns the address of the next tag-item in the list. This routine correctly handles TAG_END, TAG_DONE, TAG_MORE, TAG_IGNORE and TAG_SKIP.

TAG_END and TAG_DONE both terminate a TagItems-array (in fact, TAG_DONE is the same as TAG_END).

With TAG_MORE, you can redirect the processing to a new list of tags. Note that the processing will not return to the previous list when a TAG_END/TAG_DONE is encountered.

TAG_IGNORE disables the processing of an entry in the list. This entry is just ignored (We use this technique for filtering).

TAG_SKIP skips this tagitem, and the next number of tagitems as indicated in the tag's ti_Data field.

INPUTS
tagListPtr
Pointer to an element in a taglist.
RESULT
Next tag item or NULL if you reached the end of the list.

NOTES
- TAG_MORE works like "go on with new list" instead of "read new list and go on with the current one".

EXAMPLE
BUGS
SEE ALSO
INTERNALS
HISTORY
17.02.1997 ldp
Enhanced TAG_MORE handling: return NULL if ti_Data is 0. This fixed some more Enforcer hits.
14.02.1997 ldp
Add extra checks for empty arguments
27.01.1997 ldp
Polish
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.
24.10.1996 aros
Use the official AROS macros over the __AROS versions.
01.10.1996 digulla
Use post-increment (It used to skip the first tag-item and sometimes it may have even returned illegal values)
28.08.1996 digulla
Two more functions